package vn.conghuy.talkwithme.data.sqlmodel;

import vn.conghuy.talkwithme.android.utils.DatabaseHelper;
import android.database.Cursor;

public class StaticInfoModel {
	/**
	 * @uml.property  name="_id"
	 */
	public int _id;
	/**
	 * @uml.property  name="keyword"
	 */
	public String keyword;
	/**
	 * @uml.property  name="name"
	 */
	public String name;
	
	public static String getName(String keyword){
		String query = String.format("select name from StaticInfo where keyword = '%s'", keyword);
		Cursor cursor = DatabaseHelper.GetInstance().ExecuteQuery(query);
		
		if(cursor.moveToFirst()){
			return cursor.getString(cursor.getColumnIndex("name"));
		}
		return null;
	}
}
